package com.example.common.handle;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@Component
@Slf4j
public class GlobalInterceptor extends HandlerInterceptorAdapter implements InitializingBean {


    @Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
        log.info("等待你添加拦截---->前");
        return super.preHandle(request, response, handler);
    }


    @Override
    public void afterPropertiesSet() throws Exception {

    }
}
